package com.example.boot.dlgoods.dao;

import com.example.boot.dladvertising.vo.WeChatIndex;
import com.example.boot.dlgoods.model.DlGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DlGoodsMapper {
	int deleteByPrimaryKey(String id);

	int insert(DlGoods record);

	int insertSelective(DlGoods record);

	DlGoods selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(DlGoods record);

	int updateByPrimaryKey(DlGoods record);

	List<WeChatIndex> findByGoodsAdvertising();

	List<DlGoods> findByIndexGoods(@Param("page") Integer page, @Param("size") Integer size);
	/**
	 * 根据商店Id查找所有商品
	 * 
	 * @param adminId
	 * @return
	 * @throws Exception
	 */
	List<DlGoods> byShopFindAllGoods(String adminId) throws Exception;

	/**
	 * 查找綜合相关商品
	 * 
	 * @return
	 * @throws Exception
	 */
	List<DlGoods> likeGoodsList(@Param("name")String name,@Param("page") Integer page,@Param("size") Integer size) throws Exception;
	
	/**
	 * 查找
	 * @param name
	 * @return
	 * @throws Exception
	 */
	List<DlGoods> orderDescList(@Param("name")String name,@Param("page") Integer page,@Param("size") Integer size) throws Exception;


	/**
	 * 根据价格查找商品
	 * @param name
	 * @param bPrice
	 * @param ePrice
	 * @param page
	 * @param size
	 * @return
	 * @throws Exception
	 */
	List<DlGoods> byBPriceOrEPriceFindList(@Param("name") String name,@Param("bPrice")Double bPrice,@Param("ePrice")Double ePrice, @Param("page") Integer page, @Param("size") Integer size) throws Exception;

}